import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import Login from '@/pages/login' //登录
import Home from '@/pages/home' //home
import Error from '@/pages/404' //404
import Content from '@/pages/cont' //内容
import Echart from '@/pages/echart' //内容

// 若果不需要再菜单中显示就添加 hidden: true ，iconCls是图标
  let routes = [
  {
    path: '/',
    name: '登录',
    component: Login,
    hidden: true  //是否在菜单栏显示
  },{ 
    path: '/Login',
    name: '登录',
    component: Login,
    hidden: true
  },{ 
    path: '/Home',
    name: 'home',
    component: Home,
    hidden: true
  },{
    path: '/Error',
    name: '404',
    component: Error,
    hidden: true
  },{
    path: '/',
    component: Home,
    name: '测试内容',
    iconCls:'el-icon-goods',
    children: [{
      path: '/Content',
      name: '内容',
      component: Content
    },{
      path: '/Echart',
      name: 'echart',
      component: Echart
    }]
  }
]
export default new Router({
  routes
})
